<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 简单数据类型
        const wes = Symbol('wes');
        const person = Symbol('wes');
        console.log(wes,typeof wes);
        const classRoom = {
            "东理faker": "李总",
            [Symbol()]: "刘印",
            [Symbol()]: "刘天浩",
            [Symbol("Mark")]: "{grade: 50,gender: 'male'}",
            [Symbol("olivia")]: "{grade: 80,gender: 'female'}",
            [Symbol("olivia")]: "{grade: 80,gender: 'female'}"
        }
        const keys = Object.keys(classRoom);
        const syms = Object.getOwnPropertySymbols(classRoom);
        console.log(syms);
        for(let key of keys) {
            console.log(classRoom[key]);
        }
        for(let sym of syms) {
            console.log(classRoom[sym]);
        }
        const data = [...keys.map(key=>classRoom[key]),
            ...syms.map(sym=>classRoom[sym])]
            console.log(data);
            
            console.log("-----------------------");
            // 对象字面量最根正苗红的遍历API
            // Symbol 可以给对象带来唯一性，但是它与传统的key不同
            // symbol 没有Object.keys方法

    </script>
</body>
</html>